package org.framework.web.core.servlet;

import org.framework.web.core.context.ApplicationContext;

import javax.servlet.*;
import javax.servlet.http.HttpServlet;

/**
 * 中央调度器
 */
public class InitServlet extends HttpServlet {
    @Override
    public void init(ServletConfig config) {
        // 初始化上下文内容
        String location = config.getInitParameter("contextConfigLocation").split(":")[1];
        ApplicationContext context = new ApplicationContext(location);
        onRefresh(context);
    }
    protected void onRefresh(ApplicationContext context) {

    }
}
